***************************************************************************************
* "Who You Going to Call? Gender Inequality in External Demands for Parental Involvment' by Kristy Buzard, Laura K Gee, Olga Stoddard
* Purpose: Master do-file. Runs a push-button replication of "Who You Going to Call? Gender Inequality in External Demands for Parental Involvment"
* Last edited: 26 May 2025
***************************************************************************************
/* Instructions: 
	1. Set the path to this replication package in the areas marked "SET DIRECTORY HERE" (Line 23)
	2. Install necessary packages
	3. Run this do-file 
*/
***************************************************************************************
clear all
set more off
version 17	

	
//Set globals: Main path should be set to the uppermost folder of the replication package.	
	global path "[SET MAIN DIRECTORY HERE]"
	global data "$path/1_data"
	global scripts "$path/2_scripts"
	global output "$path/4_output"
		   global figures "$output/figures"
		   global tables "$output/tables"
		   
	cd "$scripts"

	* For replication of experimental results: 
	global july_import = 1
	global may_import = 1
	global may_merge = 1
	global july_merge = 1
	global analysisreplication = 1
	
	* For Figure 1, 5, M1 &M 2 & Table 4
	global decisionmaker_raw = 1
	global Figure1PanelA = 1
	global Figure1PanelB = 1
	global Table4 = 1
	global clean_decision = 1
	global Figures_M1M2 = 1



	global outputs "july_import may_import may_merge july_merge analysisreplication decisionmaker_raw Figure1PanelA Figure1PanelB Table4 clean_decision Figures_M1M2"

// Install necessary packages
local pkgs savesome unique coefplot estout fsum

foreach pkg in `pkgs' {
    cap which `pkg'
    if _rc {
        ssc install `pkg'
    }
}

// Run do-files
foreach output of global outputs {
    if $`output' == 1 {
		cd "$scripts"
        do "`output'.do"
    }
}
